package
{
	import flash.display.Sprite;
	import flash.text.TextField;
	import flash.text.TextFormat;
	import flash.text.TextFormatAlign;
	
	public class LetterBox extends Sprite
	{
		public static const SIZE:int = 65;
		
		private var _textFormat:TextFormat = new TextFormat("Eraser", 40, 0xffffff, false, null, null, null, null, TextFormatAlign.CENTER);
		private var _letter:String;
		
		public function LetterBox(letter:String)
		{
			_letter = letter;
			
			var _hitArea:Sprite = new Sprite();
			_hitArea.graphics.beginFill(0xff0000,0);
			_hitArea.graphics.drawCircle(0,0,23);
			_hitArea.graphics.endFill();
			addChild(_hitArea);
			
			var tf:TextField = new TextField();
			tf.embedFonts = true;
			tf.defaultTextFormat = _textFormat;
			tf.width = SIZE;
			tf.height = SIZE;
			tf.text = letter;
			tf.x = -SIZE / 2;
			tf.y = -25;
			tf.selectable = false;
			tf.mouseEnabled == false;
			addChild(tf);
			
			mouseChildren = false;
		}
		
		public function get letter():String { return _letter; }
		
		public override function toString():String { return _letter; }
	}

}